<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .main {
            width: 800px;
            height: 400px;
            background: aqua;
            border: 1px solid black;
            display: flex;
            /* 主轴排序 */
            /* justify-content: flex-start;
            justify-content: flex-end;
            justify-content: center;
            justify-content: space-between; */
            align-items: flex-start;
            align-items: stretch;
            /*子元素没有高度的时候，可以使用stretch(拉伸)*/
        }
        .item {
            background: chartreuse;
            font-size: 30px;
            border: 1px solid darkblue;
            color: firebrick;
            width: 50px;
            /* height: 50px; */
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="main">
            <div class="item">1</div>
            <div class="item">2</div>
            <div class="item">3</div>
            <div class="item">4</div>
            <div class="item">5</div>
            <div class="item">6</div>
            <div class="item">7</div>
            <div class="item">8</div>
            <div class="item">10</div>
            
        </div>
    </div>
</body>

</html>